#二分查找
def binSerch(list,target):
    left,right = 0,len(list)-1
    while left<=right:
        middle = (left + right) // 2
        if list[middle] == target:
            return middle
        elif list[middle] > target:
            right = middle - 1
        elif list[middle] < target:
            left = middle + 1
    return f"没找到{target}"
print(binSerch([1,2,3,4,5,6,7,8,9],0))
